import axios from '@/utils/request'

// 素材管理的获取图片的功能
export function getPictures (data) {
  return axios({
    method: 'get',
    url: '/mp/v1_0/user/images',
    params: data
  })
}

// 收藏图片
export function getTarget (id, collect) {
  return axios({
    method: 'put',
    url: '/mp/v1_0/user/images/' + id,
    data: {
      collect
    }
  })
}

// 删除图片素材中的图片
export function delArticle (id) {
  return axios({
    method: 'delete',
    url: '/mp/v1_0/user/images/' + id
  })
}

// 上传素材
export function upDatePic (fd) {
  return axios({
    method: 'post',
    url: '/mp/v1_0/user/images',
    data: fd
  })
}
